package com.atguigu.principle.singleresponsibility;

public class SingleResponseibility1 {
    public static void main(String[] args) {
        Vehicle vehicle = new Vehicle();
        vehicle.run("小车");
        vehicle.runAir("飞机");
        vehicle.runWater("小船");
    }
}

class  Vehicle{
    public void run(String vehicle){
        System.out.println(vehicle+"会在公路上运行。。。。");
    }
    public void runAir(String vehicle){
        System.out.println(vehicle+"会在天上飞。。。。");
    }
    public void runWater(String vehicle){
        System.out.println(vehicle+"会在水里滑行。。。。");
    }
}

